package org.example.fastproject.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @Author 王海舟
 * @Date 2023/1/4 10:32
 * @PackageName:org.example.store.common.config
 * @ClassName: CommonConfig
 * @Description: 通用配置类
 * @Version 1.0
 */
@Configuration
@EnableAsync
public class CommonConfig {
    /**
     * 密码编码器
     * @return
     */
    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
